{include file="public/head" /}
<title>用户登录</title>
<style>#login{width: 100%;margin-top: 20px}</style>
</head>
<body>
	<header class="am-topbar am-topbar-fixed-top wos-header">
    <div class="am-container">
        <h1 class="am-topbar-brand">
            <a href="{:url('index/Index/index')}"><img src="__STATIC__/images/logo.png" alt=""></a>
        </h1>

        <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-warning am-show-sm-only"
        data-am-collapse="{target: '#collapse-head'}">
        <span class="am-sr-only">导航切换</span>
        <span class="am-icon-bars"></span>
        </button>

        <div class="am-collapse am-topbar-collapse" id="collapse-head">
            <ul class="am-nav am-nav-pills am-topbar-nav">
                <li><a href="{:url('index/Index/index')}">首页</a></li>
				<!--nav仅输出4个部门按钮，多余的放进下拉按钮中-->
				{volist name="nav" id="vo" length="3"}
				<li><a href="{:url('NewsListController/index',array('id'=>$vo['id']))}">{$vo.name}</a></li>
				{/volist}
				<li class="am-dropdown" data-am-dropdown>
					<a class="am-dropdown-toggle">更多部门<span class="am-icon-caret-down"></span></a>
					<ul class="am-dropdown-content">
						{volist name="nav" id="vo" offset="3" }
						<li><a href="{:url('NewsListController/index',array('id'=>$vo['id']))}">{$vo.name}</a></li>
						{/volist}
					</ul>
				</li>
            </ul>
			<div class="am-topbar-right">
				<a href="{:url('index/RegisterController/index')}" class="am-btn am-btn-success am-topbar-btn am-btn-sm"><span class="am-icon-pencil"></span>注册</a>
			</div>

			<div class="am-topbar-right">
				<a href="{:url('index/LoginController/index')}" class="am-btn am-btn-danger am-topbar-btn am-btn-sm login"><span class="am-icon-user"></span> 登录</a>
			</div>
        </div>
    </div>
</header>
	<div class="am-container">
		<form class="am-form" action="{:url('index/loginController/doLogin')}" id="form" method="post">
			<div class="am-u-sm-12 am-u-md-5 am-u-md-centered " style="margin-top: 50px">
				<legend>用户登录</legend>
				<div class="am-form-group">
					<label for="username">用户名</label>
					<input type="text" name="username" id="username"/>
				</div>
				<div class="am-form-group">
					<label for="password">密码</label>
					<input type="password" name="password" id="password"/>
				</div>
				<div class="am-form-group">
					<label for="captcha">验证码</label>
					<div>
						<label hidden>验证码</label>
					<input class="am-fl" type="text" name="captcha" id="captcha" style="width: 60%">
					<div class="captcha">
						<img src="{:captcha_src()}" onclick="this.src='{:captcha_src()}'" alt="captcha" />
					</div>
					</div>
				</div>
				<a id="login" class="am-btn am-btn-danger ajax-submit">登录</a>
				<a href="{:url('LoginController/resetPwd')}">忘记密码</a>
			</div>
		</form>
	</div>
</body>
<script src="__STATIC__/js/ajax-form.js"></script>
</html>